package cn.stylefeng.guns.modular.business.custom.enums;

public enum PriceLibraryTypeEnum {

    UN_KNOWN(0, "未知类型"),
    MULTI_EXPORT(1, "批量导入"),
    DISPATCHER_ADD(2, "调度创建(需要审核)"),
    CHECKER_ADD(3, "审核专员创建");

    PriceLibraryTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public int type;

    public String desc;

    public static boolean valid(Integer type) {
        if (type == null) {
            return false;
        }
        PriceLibraryTypeEnum[] pts = PriceLibraryTypeEnum.values();
        for (PriceLibraryTypeEnum pt : pts) {
            if (type == pt.type) {
                return true;
            }
        }
        return false;
    }
}
